package nowcode;

import java.io.*;

public class MagicCoin {

    public static void main(String[] args) {
        InputStream is = System.in;
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(is));
            String inputStr = br.readLine();
            int needCoin = Integer.parseInt(inputStr);
            myFunction(needCoin);
            System.out.println();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void myFunction(int needCoin) {
        if(needCoin == 0){
            return;
        }
        if (needCoin % 2 == 1) {
            myFunction((needCoin - 1) / 2);
            System.out.print(1);
        } else if (needCoin % 2 == 0) {
            myFunction((needCoin - 2) / 2);
            System.out.print(2);
        }
    }
}
